#pragma once

#include <QColor>

// 常量
class Const {
    // 格
    public: static const int GRID_SIZE = 26;                                            // 尺寸

    // 方块
    public: static const int BLOCK_GRID_COUNT_H = 4;                                    // 一个方向由
    public: static const int BLOCK_GRID_COUNT_V = 4;                                    // 4*4 的格组成

    // 游戏区域
    public: static const int GAME_BOARD_X = 20;                                         // 左上角 X 坐标
    public: static const int GAME_BOARD_Y = 20;                                         // 左上角 Y 坐标
    public: static const int GAME_BOARD_GRID_COUNT_H = 10;                              // 横向方块数
    public: static const int GAME_BOARD_GRID_COUNT_V = 20;                              // 纵向方块数
    public: static const int GAME_BOARD_WIDTH = GRID_SIZE * GAME_BOARD_GRID_COUNT_H;    // 宽度
    public: static const int GAME_BOARD_HEIGHT = GRID_SIZE * GAME_BOARD_GRID_COUNT_V;   // 高度
    public: static const QColor GAME_BOARD_COLOR;                                       // 背景色

    // 预览区域
    public: static const int PREVIEW_X = GAME_BOARD_X + GAME_BOARD_WIDTH + GRID_SIZE;   // 左上角 X 坐标
    public: static const int PREVIEW_Y = GAME_BOARD_Y;                                  // 左上角 Y 坐标
    public: static const int PREVIEW_WIDTH = GRID_SIZE * 5;                             // 宽度
    public: static const int PREVIEW_HEIGHT = GRID_SIZE * 5;                            // 高度
    public: static const QColor PREVIEW_COLOR;                                          // 背景色

    // 定时器
    public: static const int TIMER_INIT = 1000;                                         // 初始间隔值，单位毫秒
    public: static const int TIMER_GROW = 100;                                          // 增长间隔值，单位毫秒，难度每增加1级，间隔值减少此数

    // 难度
    public: static const int DIFF_BASE = 5000;                                          // 基数。分数每达到此数的整数倍时，难度增加
    public: static const int DIFF_MAX = 10;                                             // 最大值。难度达到此数后不再增加

    // 胜利数
    public: static const int WIN_NUMBER = DIFF_BASE * DIFF_MAX;                         // 达到此数胜利

    // 状态栏
    public: static const int STATUS_BAR_PART_COUNT = 2;                                 // 格数

    // 音乐
    public: static const char* MUSIC_FILE_PATH;                                         // 文件路径

    // 画图片控件的边框(PictureCtrl.drawEdge 方法)用到的颜色
    public: public: static const QColor COLOR_LEFT_TOP_1;                               // 左上外层颜色
    public: public: static const QColor COLOR_LEFT_TOP_2;                               // 左上内层颜色
    public: public: static const QColor COLOR_RIGHT_BOTTOM_1;                           // 右下内层颜色
    public: public: static const QColor COLOR_RIGHT_BOTTOM_2;                           // 右下外层颜色

    // 主窗口
    public: static const char* IMAGE_PATH;                                              // 背景图片文件路径

    // 按钮
    public: static const char* BUTTON_START_IMAGE_PATH;                                 // "开始"按钮图片文件路径
    public: static const char* BUTTON_PAUSE_IMAGE_PATH;                                 // "暂停"按钮图片文件路径
    public: static const char* BUTTON_RESUME_IMAGE_PATH;                                // "继续"按钮图片文件路径
    public: static const char* BUTTON_MUSIC_PLAY_IMAGE_PATH;                            // "播放音乐"按钮图片文件路径
    public: static const char* BUTTON_MUSIC_STOP_IMAGE_PATH;                            // "关闭音乐"按钮图片文件路径
};
